<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>测试一个流程图的箭头进度css</title>
  <style>
    * {
      padding: 0;
      margin: 0;
    }
    body {
      display: flex;
      justify-content: center;
      flex-direction: column;
      align-items: center;
      height: 500px;
    }
    .flow-item {
      width: 100px;
      height: 28px;
      font-size: 14px;
      background-color: #FFEBEE;
      text-align: center;
      line-height: 28px;
      position: relative;
      padding: 0 15px;
      transition: all .3s;
    }
    .span1::before,
    .span1::after {
      position: absolute;
      top: 0;
      height: 0;
      width: 0;
      content: ' ';
    }
    /**
      * border-width: 上 右 下 左
      */
    .span1::before {
      left: 0;
      border-width: 14px 0px 14px 10px;
      border-color: transparent transparent transparent #fff;
      border-style: solid;
    }
    .span1::after {
      right: 0;
      border-width: 14px 0px 14px 10px;
      border-color: #fff transparent #fff #FFEBEE;
      border-style: solid;
      transition: all .3s;
    }
    .flow-item:hover {
      background-color: #f00;
      color: #fff;
    }
    .flow-item:hover .span1::after {
      border-left-color: #f00;
    }

    .span1::before,
    .span1::after,
    .span2::after,
    .span2::before {
      position: absolute;
      top: 0;
      height: 0;
      width: 0;
      content: ' ';
    }
    .flow-item:last-child {
      background-color: #9C27B0;
      color: #fff;
    }
    .flow-item:last-child:hover {
      background-color: #F3E5F5;
      color: #9C27B0;
    }
    /**
      * border-width: 上 右 下 左，看你需要哪边的三角形，可以设置它对应的宽度
      */
    .span2::before {
      left: 0;
      border-width: 14px 0px 14px 20px;
      border-color: transparent transparent transparent #fff;
      border-style: solid;
    }
    .span2::after {
      right: 0;
      border-width: 14px 0px 14px 20px;
      border-color: #fff transparent #fff #9C27B0;
      border-style: solid;
      transition: all .3s;
    }
    .flow-item:hover {
      background-color: #F3E5F5;
      color: #fff;
    }
    .flow-item:hover .span2::after {
      border-left-color: #F3E5F5;
    }
  </style>
</head>
<body>
  <div class="flow-item"><span class="span1">维护demand</span></div>
  <div class="flow-item"><span class="span2">维护demand</span></div>
</body>
</html>